


# to load data
library(rio)

# to manipulate data
library(tidyverse)


# load data about laws 
laws <- import("list_laws.csv")



#### GENERATE TABLE B1
country_years <- laws %>%
  select(country,year) %>%
  unique() %>%
  group_by(country) %>%
  arrange(year, .by_group = T) %>%
  mutate(law = "year") %>%
  pivot_wider(id_cols = "country", names_from = "law", values_from = "year") %>%
  mutate(year =  paste( unlist(year), collapse=', '))
